﻿using System;
using System.Linq;

namespace SamizdatSearch
{
  public static class Arrays
  {
    public static bool AreEqual<T>(T[] a1, T[] a2)
      where  T : IEquatable<T>
    {
      if (a1.Length != a2.Length) return false;
      for (int i = 0; i < a1.Length; i++)
        if (!a1[i].Equals(a2[i])) return false;
      return true;
    }
    public static string Print(byte[] arr)
    {
      return string.Join(", ", arr.Select(i => i.ToString()));
    }
  }
}